<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<link rel="shortcut icon" href="image/favicon.ico" />
		<title></title>
	</head>

	<body>
		<div id="container" class="container-fluid"></div>
		<script src="lib/jquery/js/jquery-1.10.1.min.js"></script>
		<script src="lib/requirejs/require.min.js"></script>
		<script src="js/vw.config.require.js"></script>
		<script>
			$(document).ready(function() {
				var keys = {
					"table": "",
					"catalogID": "",
					"year": "",
					"period": "",
					"userID": ""
				};
				$.each(keys, function(k, val) {
					var reg = new RegExp("(^|&)" + k + "=([^&]*)(&|$)");
					var r = window.location.search.substr(1).match(reg);
					if(r != null) {
						keys[k] = unescape(r[2]);
					}
				});
				console.log(keys);
				//load("1538235454853", "510122106200001", "2018", "4", "278_1");
				load(keys["table"], keys["catalogID"], keys["year"], keys["period"], keys["userID"]);

				function load(table, catalogID, year, period, userID) {
					require(['vw.edittable'], function() {
						$('body').css('height', $(window).height() + "px");
						$("#container").vw_edittable({
							type: "report",
							showNewData: false,
							showErrorlog: false,
							showEdit: false,
							editable: false,
							extrapara: {
								"catalogID": catalogID,
								"userID": userID,
								"period": period,
								"year": year
							},
							$container: $("body"),
							heightDiff: -40,
							dataURL: "http://211.103.218.91:8001/NewService_new/VwService/CollectionManage.asmx/LoadData"
						}).vw_edittable('ajaxLoadReportData', "html/" + table + ".html", table, table, 1);
					});
				}
			});
		</script>
	</body>

</html>